import {
    legacy_createStore,
    applyMiddleware,
    combineReducers
} from "redux"

import thunk from "redux-thunk"

import logger from "redux-logger"

import reducer from "./module/reducer"
import table_reducer from "./module/table_reducer"

const ALL_reducer = combineReducers({
    reducer,
    table_reducer
})

export default legacy_createStore(ALL_reducer,applyMiddleware(thunk,logger))


/*
    1.仓库的搭建
    2.组件和仓库产生关联
    3.组件派发数据给仓库
    4.从仓库取数据并渲染
*/